package com.blkbox.javaee.quartz.multipletrigger;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

public class OneJob implements Job {
	@Override
	public void execute(JobExecutionContext context) throws JobExecutionException {
		long timeDiff = context.getTrigger().getPreviousFireTime().getTime() - context.getTrigger().getStartTime().getTime();
		System.out.println(context.getTrigger().getJobKey() + " is runing, time passed " + Math.round(timeDiff / 1000) + " seconds");
	}
}
